import React from 'react';
import { Platform, TouchableOpacity, View, Text } from 'react-native';

const PlatformButton = ({ title, onPress }) => {
  if (Platform.OS === 'android') {
    return (
      <TouchableOpacity onPress={onPress} style={styles.androidButton}>
        <Text style={styles.buttonText}>{title}</Text>
      </TouchableOpacity>
    );
  }

  if (Platform.OS === 'ios') {
    return (
      <TouchableOpacity onPress={onPress} style={styles.iosButton}>
        <Text style={styles.buttonText}>{title}</Text>
      </TouchableOpacity>
    );
  }

  return (
    <button onClick={onPress} style={styles.desktopButton}>
      {title}
    </button>
  );
};

export default PlatformButton;